﻿{layout:page} {class:Shop.Supplier.order.Order_View}
<lbhead>
    <title><%=Tag("订单详情")%>-<%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_OrderType)%>-<%=site.title%></title>
</lbhead>
<lbfile>
    <link rel="stylesheet" type="text/css" href="<%=site.AdminCssPath %>/order.css" />
    <style>body{background:#fff;margin:0;padding:0;font-size:12px;text-align:left}input{font-size:12px}.tools .close,.tools .print{float:right;}.tools .name{float:left;margin-right:10px}</style>
    <style media=print>.print-btn{display:none;}</style>
</lbfile>
<lbbody>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            var ul = $("div.mod-tab ul");
            var li = $("div.mod-tab ul li");
            var divShow = $("div.main");
            $(li).each(function (i) {
                var _this = this;
                $(_this).click(function () {
                    ul.find("li").removeClass("selected");
                    $(_this).addClass("selected");
                    divShow.find("div.cont").hide();
                    var divindex = divShow.find("div.cont")[i];
                    $(divindex).show();
                    SetCookie("OrderDetails-<%=model.id %>", i, 1);
                });
            });
            var i = GetCookie("OrderDetails-<%=model.id %>");
            if (i == "" || i == null)
                i = 0;
            if (i!=""){
                $(li).each(function () {
                    ul.find("li").removeClass("selected");
                    divShow.find("div.cont").hide();
                    var divindex = divShow.find("div.cont")[i];
                    $(li[i]).addClass("selected");
                    $(divindex).show()
                });
            }
        });
        function SaveOrder(id) {
            var postData = GetFormJsonData("shop");
            var url = "<%=site.AdminPath %>/ajax/ajax_order.aspx?__Action=Order_Edit&id=" + id;
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function SaveComment(id) {
            var postData = GetFormJsonData("comment");
            var url = "<%=site.AdminPath %>/ajax/ajax_order.aspx?__Action=Comment_Edit&id=" + id;
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        //确认订单
        function Order_type(t, id, model) {
            if (!confirm("<%=Tag("确认操作吗？")%>"))
                return false;
            var postData = { "t": t };
            var url = "<%=site.AdminPath %>/ajax/ajax_order.aspx?__Action=Order_type&id=" + id + "&model=" + model;
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function EditBillingAddress(id) {
            var title_ = "<%=Tag("编辑收货人")%>";
            var url_ = "billingaddress_edit_window.aspx?id=" + id;
            var width_ = 600;
            var height_ = 'auto';
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function EditOrderMoney(id) {
            var title_ = "<%=Tag("修改金额")%>";
            var url_ = "order_money_edit_window.aspx?id=" + id;
            var width_ = 400;
            var height_ = 'auto';
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function Order_shipping(id) {
            var title_ = "<%=Tag("发货")%>";
            var url_ = "shipping_window.aspx?id=" + id;
            var width_ = 600;
            var height_ = 'auto';
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function Order_shipping_view(id) {
            var title_ = "<%=Tag("运输单据")%>";
            var url_ = "shipping_view_window.aspx?id=" + id;
            var width_ = 600;
            var height_ = 'auto';
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_, 'shippingview');
        }
        function Order_shipping_log(id) {
            var title_ = "<%=Tag("物流跟踪")%>";
            var url_ = "shipping_log_window.aspx?id=" + id;
            var width_ = 700;
            var height_ = 'auto';
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_, 'shippingview');
        }
        function Pro_Del(id) {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_order.aspx?__Action=OrderPro_Del&id=" + id;
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function Comment_Del(id) {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_order.aspx?__Action=Comment_Del&id=" + id;
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function Pro_Save(id) {
            var postData = GetFormJsonData("pro");
            var url = "<%=site.AdminPath %>/ajax/ajax_order.aspx?__Action=OrderPro_Edit&id=" + id;
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function selectproduct(id){
            var pnumber=$("#pnumber").val();
            var title_ = "编辑订单商品规格";
            var url_ = "selectproduct_window.aspx?orderid=<%=model.id %>&id=" + id+"&pnumber="+pnumber;
            var width_ = 500;
            var height_ = 'auto';
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_, 'selectproduct');
        }
    </script>
<div class="print-btn">
    <div class="tools">
        <ul>
            <%if (model.IsRefund == 1){ %>
            <li class="tip"><a href="#"><b></b><span><%=Tag("已取消")%></span></a></li><%} %>
            <%if (model.Type_id_OrderType == 212){ %>
            <li class="tip"><a href="#"><b></b><span><%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_OrderType)%></span></a></li><%} %>
            <%if (model.IsInvalid == 1)
              { %>
            <li class="cancel"><a href="#" class="a-btn" onclick="Order_type(0,<%=model.id %>,'IsInvalid');"><b></b><span><%=Tag("有效订单")%></span></a></li>
            <%}
              else
              {
            %>
            <%if (model.IsRefund == 2){ %>
            <li class="submit"><a href="#" class="a-btn" onclick="Order_type(1,<%=model.id %>,'IsRefund');"><b></b><span><%=Tag("同意")%><%=Tag("取消订单")%></span></a></li>
            <li class="submit"><a href="#" class="a-btn" onclick="Order_type(3,<%=model.id %>,'IsRefund');"><b></b><span><%=Tag("拒绝")%><%=Tag("取消订单")%></span></a></li>
            <%}
                  if (model.IsVerified == 0)
                  { %>
            <li class="submit"><a href="#" class="a-btn" onclick="Order_type(1,<%=model.id %>,'IsInvalid');"><b></b><span><%=Tag("无效订单")%></span></a></li>
            <li class="submit"><a href="#" class="a-btn" onclick="Order_type(1,<%=model.id %>,'IsVerified');"><b></b><span><%=Tag("审核订单")%></span></a></li>
            <%}
                  else
                  { %>
            <li class="cancel"><a href="#" class="a-btn" onclick="Order_type(0,<%=model.id %>,'IsVerified');"><b></b><span><%=Tag("取消审核")%></span></a></li>
            <%if (model.Type_id_OrderType != 212)
              {%>
            
            <%if (model.IsShipped_All != 1)
              { %>
            <li class="ship"><a href="#" class="a-btn" onclick="Order_shipping(<%=model.id %>)"><b></b><span><%=Tag("发货")%></span></a></li>
            <%} %>
            <%} %>

            <%}
              } %>
            <li class="close"><a href="javascript:void(0);" onclick="window.close();"><b></b><span><%=Tag("关闭")%></span></a></li>
            <li class="print"><a href="javascript:void(0);" onclick="window.print();"><b></b><span><%=Tag("打印")%></span></a></li>
        </ul>
    </div>
</div>
    <div class="main" id="infotab">
        <div class="mod-tab">
            <div class="tablist">
                <ul>
                    <li class="selected"><a><span><%=Tag("基本信息")%></span></a></li>
                    <li><a><span><%=Tag("商品信息")%></span></a></li>
                    <li><a><span><%=Tag("配送记录")%><strong>(<%if (TransportCount>0){ %><font><%=TransportCount %></font><%}else{%>0<%} %>)</strong></span></a></li>
                    <li><a><span><%=Tag("订单备注")%></span></a></li>
                    <li><a><span><%=Tag("订单留言")%><strong>(<%if (CommentCount>0){ %><font><%=CommentCount %></font><%}else{%>0<%} %>)</strong></span></a></li>
                    <li><a><span><%=Tag("订单日志")%><strong>(<%if (LogCount>0){ %><font><%=LogCount %></font><%}else{%>0<%} %>)</strong></span></a></li>
                </ul>
            </div>
        </div>
        <!--基本信息内容 start-->
        <div style="display: block" class="cont">
            <%if (model.IsInvalid == 1)
                { %>
            <div id="process" class="section2">
		        <div class="node fore ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("提交订单")%></li><li class="tx3"><%=FormatTime(model.Time_Add) %></li></ul></div>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <%if (model.IsRefund == 1){ %>
                    <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已取消")%></li><li class="tx3"><%=FormatTime(model.Time_Refund)%></li></ul></div>
                <%}else{ %>
                    <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("无效订单")%></li><li class="tx3"><%=FormatTime(model.Time_Completed)%></li></ul></div>
                <%} %>
            </div>
            <%}
              else if (model.IsVerified == 0)
                { %>
            <div id="process" class="section2">
		        <div class="node fore ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("提交订单")%></li><li class="tx3"><%=FormatTime(model.Time_Add) %></li></ul></div>
            	<div class="proce wait"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node wait"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("审核订单")%></li><li class="tx3"></li></ul></div>
            </div>
            <%}
              else if (model.IsRefund == 2)
                { %>
            <div id="process" class="section3">
		        <div class="node fore ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("提交订单")%></li><li class="tx3"><%=FormatTime(model.Time_Add) %></li></ul></div>
                <div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("申请取消")%></li><li class="tx3"><%=FormatTime(model.Time_Refund)%></li></ul></div>
            	<div class="proce wait"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node wait"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("审核订单")%></li><li class="tx3"></li></ul></div>
            </div>
            <%}else{ %>
            <%if (model.Type_id_OrderType == 212)
              { %>
            <div id="process" class="section3">
		        <div class="node fore ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("提交订单")%></li><li class="tx3"><%=FormatTime(model.Time_Add) %></li></ul></div>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("审核订单")%></li><li class="tx3"><%=FormatTime(model.Time_Verified)%></li></ul></div>
                <%if (model.IsCompleted != 1)
                  { %>
            	<div class="proce wait"><ul><li class="tx1">&nbsp;</li></ul></div>
            	<div class="node wait"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已完成")%></li><li class="tx3"></li></ul></div>
                <%}
                  else
                  { %>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已完成")%></li><li class="tx3"><%=FormatTime(model.Time_Completed)%></li></ul></div>
                <%} %>
            </div>
            <%}else{ %>
            <div id="process" class="section5">
		        <div class="node fore ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("提交订单")%></li><li class="tx3"><%=FormatTime(model.Time_Add) %></li></ul></div>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("审核订单")%></li><li class="tx3"><%=FormatTime(model.Time_Verified)%></li></ul></div>
                <%if (model.IsPaid != 1)
                  { %>
            	<div class="proce wait"><ul><li class="tx1">&nbsp;</li></ul></div>
            	<div class="node wait"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("未支付")%></li><li class="tx3"></li></ul></div>
                <%}
                  else
                  { %>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已支付")%></li><li class="tx3"><%=FormatTime(model.Time_Paid) %></li></ul></div>
                <%} %>
                <%if (model.IsShipped != 1)
                  { %>
            	<div class="proce wait"><ul><li class="tx1">&nbsp;</li></ul></div>
            	<div class="node wait"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已发货")%></li><li class="tx3"></li></ul></div>
                <%}
                  else
                  { %>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%if (model.IsShipped_All != 1)
                                                                                         { %><%=Tag("部分发货")%><%}
                                                                                         else
                                                                                         { %><%=Tag("已发货")%><%} %></li><li class="tx3"><%=FormatTime(model.Time_Shipped)%></li></ul></div>
                <%} %>
                <%if (model.IsReceived != 1)
                  { %>
            	<div class="proce wait"><ul><li class="tx1">&nbsp;</li></ul></div>
            	<div class="node wait"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已收货")%></li><li class="tx3"></li></ul></div>
                <%}
                  else
                  { %>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已收货")%></li><li class="tx3"><%=FormatTime(model.Time_Received)%></li></ul></div>
                <%} %>
                <%if (model.IsCompleted != 1)
                  { %>
            	<div class="proce wait"><ul><li class="tx1">&nbsp;</li></ul></div>
            	<div class="node wait"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已完成")%></li><li class="tx3"></li></ul></div>
                <%}
                  else
                  { %>
            	<div class="proce ready"><ul><li class="tx1">&nbsp;</li></ul></div>
                <div class="node ready"><ul><li class="tx1">&nbsp;</li><li class="tx2"><%=Tag("已完成")%></li><li class="tx3"><%=FormatTime(model.Time_Completed)%></li></ul></div>
                <%} %>
            </div>
            <%} %>
            <%} %>
            <div class="mod-title">
                <div><%=Tag("基本信息")%></div>
            </div>
            <div class="mod-table-main">
                <div class="con style05">
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                            <tr>
                                <th width="33%" height="30px">
                                    <%=Tag("基本信息")%>
                                </th>
                                <th width="33%" class="x-tab">
                                    <%=Tag("金额")%>
                                    <%if (model.IsPaid == 0)
                                      { %>
                                    <a href="javascript:EditOrderMoney(<%=model.id %>);"><%=Tag("编辑")%></a>
                                    <%} %>
                                </th>
                                <th class="x-tab">
                                    <%=Tag("收货人信息")%> 
                                    <%if (model.IsShipped == 0)
                                      { %>
                                     <a href="javascript:EditBillingAddress(<%=model.id %>);"><%=Tag("编辑")%></a>
                                    <%} %>
                                </th>
                            </tr>
                            <tr>
                                <td valign="top" align="right" height="30px">
                                    <div class="hr10">
                                    </div>
                                    <div class="mod-table-main">
                                        <div class="con style02">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="100" align="right">
                                                        <%=Tag("状态")%>：
                                                    </td>
                                                    <td>
                                                        <%=Shop.Bussiness.Order.OrderStatus(model, CurrentLanguage.Code, 1) %>
                                                        <%//=model.IsShipped_All==0?"["+Tag("部分发货")+"]":"" %>

                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="70" align="right">
                                                        <%=Tag("订单编号")%>：
                                                    </td>
                                                    <td>
                                                        <%=model.Code %>
                                                    </td>
                                                </tr>
                                                <%if (shop.id > 0)
                                                  {
                                                
                                                       %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("商家")%>：
                                                    </td>
                                                    <td>
                                                        <%=shop.Company%>
                                                    </td>
                                                </tr>
                                                <%} %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("订购时间")%>：
                                                    </td>
                                                    <td>
                                                        <%=FormatTime(model.Time_Add) %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("商品重量")%>：
                                                    </td>
                                                    <td>
                                                        <%=model.Weight %> <%=Tag("KG")%>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("商品体积")%>：
                                                    </td>
                                                    <td>
                                                        <%=model.Volume/1000000 %> m&sup3;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("配送方式")%>：
                                                    </td>
                                                    <td>
                                                        <%=model.Transport_Name %>[<%=model.Transport_Mark %>]
                                                        <%if(model.PickUp_id>0){ %>
                                                        <br/>
                                                        <%=Tag("自提点") %>：<%=model.PickUp_Name %><br/>
                                                        <%=Tag("自提时间")%>：<%=model.PickUp_Date.ToString("yyyy-MM-dd") %>
                                                        
                                                        <%} %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("支付方式")%>：
                                                    </td>
                                                    <td>
                                                        <%=Shop.Bussiness.Language.Content(model.Pay,CurrentLanguage)%>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("发票状态")%>：
                                                    </td>
                                                    <td>
                                                        <%=billstatus%>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="hr10">
                                    </div>
                                </td>
                                <td valign="top" align="right" height="30px">
                                    <div class="hr10"></div>
                                    <div class="mod-table-main">
                                        <div class="con style02">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("商品总额")%>：
                                                    </td>
                                                    <td align="left">
                                                        <%=FormatMoney(model.Money_Product)%>
                                                        <%=FormatMoney(model.Money_Product, model.Currency_Code)%>
                                                        
                                                    </td>
                                                </tr>
                                                <%if (model.Money_Cut>0){ %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("优惠金额")%>：
                                                    </td>
                                                    <td>
                                                        <%=FormatMoney(model.Money_Cut)%>
                                                        <%=FormatMoney(model.Money_Cut, model.Currency_Code)%>
                                                        
                                                    </td>
                                                </tr>
                                                <%} %>
                                                <%if (model.Money_Give>0){ %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("返还金额")%>：
                                                    </td>
                                                    <td>
                                                        <strong><%=FormatMoney(model.Money_Give)%>
                                                        <%=FormatMoney(model.Money_Give, model.Currency_Code)%></strong>
                                                        
                                                    </td>
                                                </tr>
                                                <%} %>
                                                
                                                 <%if (model.Money_Transport > 0)
                                                   { %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("配送费用")%>：
                                                    </td>
                                                    <td>
                                                        <%=FormatMoney(model.Money_Transport)%>
                                                        <%=FormatMoney(model.Money_Transport, model.Currency_Code)%>
                                                        
                                                    </td>
                                                </tr>
                                                <%} %>
                                                <%if (model.Money_Bill>0){ %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("发票税金")%>：
                                                    </td>
                                                    <td>
                                                        <%=FormatMoney(model.Money_Bill)%>
                                                        <%=FormatMoney(model.Money_Bill, model.Currency_Code)%>
                                                        
                                                    </td>
                                                </tr>
                                                <%} %>
                                                <%if (model.Money_Tax>0){ %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("税金")%>：
                                                    </td>
                                                    <td>
                                                        <%=FormatMoney(model.Money_Tax)%>
                                                        <%=FormatMoney(model.Money_Tax, model.Currency_Code)%>
                                                        
                                                    </td>
                                                </tr>
                                                <%} %>
                                                <tr>
                                                    <td width="100" align="right">
                                                        <%=Tag("订单总额")%>：
                                                    </td>
                                                    <td>
                                                        <%=FormatMoney(model.Money_Order)%>
                                                        <%=FormatMoney(model.Money_Order,model.Currency_Code)%>
                                                    </td>
                                                </tr>
                                                <%if (model.Money_UserCut > 0){ %>                                                
                                                <tr>
                                                    <td width="100" align="right"><%=Tag("余额支付")%>：</td>
                                                    <td>
                                                    <%=FormatMoney(model.Money_UserCut)%>
                                                    <%=FormatMoney(model.Money_UserCut, model.Currency_Code)%></td>
                                                </tr>
                                                <%} %>
                                                <%if (model.Money_UseCard311 > 0)
                                                  { %>                                                
                                                <tr>
                                                    <td width="100" align="right"><%=Tag("购物卡支付")%>：</td>
                                                    <td>
                                                    <%=FormatMoney(model.Money_UseCard311)%>
                                                    <%=FormatMoney(model.Money_UseCard311, model.Currency_Code)%></td>
                                                </tr>
                                                <%} %>
                                                <%if (model.Money_UseCard312 > 0)
                                                  { %>                                                
                                                <tr>
                                                    <td width="100" align="right"><%=Tag("代金券支付")%>：</td>
                                                    <td>
                                                    <%=FormatMoney(model.Money_UseCard312)%>
                                                    <%=FormatMoney(model.Money_UseCard312, model.Currency_Code)%></td>
                                                </tr>
                                                <%} %>
                                                <%if (model.Money_fromorder > 0){ %>                                                
                                                <tr>
                                                    <td width="100" align="right"><%=Tag("转移金额")%>：</td>
                                                    <td>
                                                    <%=FormatMoney(model.Money_fromorder)%>
                                                    <%=FormatMoney(model.Money_fromorder, model.Currency_Code)%></td>
                                                </tr>
                                                <%} %>
                                                <%if (model.Money_Pay>0){ %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("应付金额")%>：
                                                    </td>
                                                    <td>
                                                        <strong><%=FormatMoney(model.Money_Pay)%>
                                                        <%=FormatMoney(model.Money_Pay, model.Currency_Code)%></strong>
                                                        
                                                    </td>
                                                </tr>
                                                <%} %>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("可得积分")%>：
                                                    </td>
                                                    <td>
                                                        <%=str + model.Point%>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="hr10">
                                    </div>
                                </td>
                                <td valign="top" height="30px">
                                    <div class="hr10">
                                    </div>
                                    <div class="mod-table-main">
                                        <div class="con style02">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                
                                                <tr>
                                                    <td width="70" align="right">
                                                        <%=Tag("姓名")%>：
                                                    </td>
                                                    <td>
                                                        <span id="lblReceivingName"><%=model.T_Name %></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("电话")%>：
                                                    </td>
                                                    <td>
                                                        <span id="lblReceivingTelePhone"><%=model.T_Phone %></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("手机")%>：
                                                    </td>
                                                    <td>
                                                        <span id="lblReceivingPhone"><%=model.T_MobilePhone %></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("地区")%>：
                                                    </td>
                                                    <td>
                                                        <span id="lblReceivingArea"><%=Shop.Bussiness.EX_Area.GetAreaName(model.T_Area_id)%></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("地址")%>：
                                                    </td>
                                                    <td>
                                                        <span id="lblReceivingAddress"><%=model.T_Address %></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <%=Tag("邮编")%>：
                                                    </td>
                                                    <td>
                                                        <span id="lblReceivingPostCode"><%=model.T_Postalcode %></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        Email：
                                                    </td>
                                                    <td>
                                                        <span id="Span1"><%=model.T_Email %></span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="hr10">
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <!--已完成订单 end-->
            <!--商品信息 start-->
            <div class="mod-title">
              <div>商品信息</div>
            </div>
            <div class="mod-table-main">
                <div class="con style05">
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <th style="width:100px;">
                                <%=Tag("商品编号")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("商品货号")%>
                            </th>
                            <th>
                                <%=Tag("商品名称")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("规格")%>
                            </th>
                            <th style="width:70px;">
                                <%=Tag("单位")%>
                            </th>
                            <th style="width:100px;">
                                <%if (model.Type_id_OrderType == 212) { Response.Write(Tag("数量")); } else { Response.Write(Tag("订购数量")); }%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("已发数量")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("已收数量")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("单价")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("小计")%>
                            </th>
                        </tr>
                      <%foreach (Shop.Model.Lebi_Order_Product pro in pros)
                        { %>
                        <tr>
                            <td>
                                <%=pro.Product_Number %>
                            </td>
                            <td><%=Shop.Bussiness.EX_Product.GetProduct(pro.Product_id).Code%>&nbsp;</td>
                            <td>
                                <img src="<%=Image(pro.ImageOriginal,50,50) %>" style="height:30px;padding:3px 0" />
                                <%=Shop.Bussiness.Language.Content(pro.Product_Name,CurrentLanguage) %>&nbsp;<a target="_blank" href="<%=Shop.Bussiness.ThemeUrl.GetURL("P_Product",pro.Product_id.ToString(),"",CurrentLanguage)%>"><img src="<%=PageImage("icon/newWindow.png")%>" /></a>
                            </td>
                            <td>
                                <%=Shop.Bussiness.EX_Product.ProPertyNameStr(Shop.Bussiness.EX_Product.GetProduct(pro.Product_id).ProPerty131, CurrentLanguage)%>
                            </td>
                            <td><%=Lang(Shop.Bussiness.EX_Product.ProductUnit(pro.Units_id))%></td>
                            <td>
                                <%=str + pro.Count%>
                            </td>
                            <td>
                                <%=pro.Count_Shipped %>
                            </td>
                             <td>
                                <%=pro.Count_Received %>
                            </td>
                            <td>
                                <%=FormatMoney(pro.Price) %>
                            </td>
                            <td>
                                <%=str + FormatMoney(pro.Money)%>
                            </td>
                        </tr>

                    <%} %>
                    </table>
                </div>
            </div>
            <!--商品信息 end-->
            <div class="hr40">
            </div>
        </div>
        <!--基本信息内容 end-->
        <!--商品 start-->
        <div style="display: none" class="cont">
            <div class="mod-title">
                <div><%=Tag("商品信息")%></div>
            </div>
            <div class="mod-table-main">
                <div class="con style05">
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <%if (model.IsVerified==0)
                                { %>
                           <th style="width: 30px" class="selectAll">
                                <a href="javascript:void(0);" onclick="$('input[name=\'proid\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));"><%=Tag("全选")%></a>
                            </th>
                            <%} %>
                            <th style="width:100px;">
                                <%=Tag("商品编号")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("商品货号")%>
                            </th>
                            <th>
                                <%=Tag("商品名称")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("规格")%>
                            </th>
                            <th style="width:70px;">
                                <%=Tag("单位")%>
                            </th>
                            <th style="width:100px;">
                                <%if (model.Type_id_OrderType == 212) { Response.Write(Tag("数量")); } else { Response.Write(Tag("订购数量")); }%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("已发数量")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("已收数量")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("单价")%>
                            </th>
                            <th style="width:100px;">
                                <%=Tag("小计")%>
                            </th>
                        </tr>
                      <%foreach (Shop.Model.Lebi_Order_Product pro in pros)
                        { %>
                        <tr>
                            <%if (model.IsVerified==0)
                                { %>
                            <td style="text-align:center"><input type="checkbox" name="proid" value="<%=pro.id %>" del="true" /><input type="hidden" name="Uproid" value="<%=pro.id %>" pro="true" /></td>
                            <%} %>
                            <td>
                                <%=pro.Product_Number %>
                                <%if (model.IsVerified == 0 && pro.Count_Shipped == 0)
                                  { %>
                                <a href="javascript:void(0);" onclick="selectproduct(<%=pro.id %>)"><%=Tag("编辑")%></a>
                                <%} %>
                            </td>
                            <td><%=Shop.Bussiness.EX_Product.GetProduct(pro.Product_id).Code%>&nbsp;</td>
                            <td>
                                <img src="<%=Image(pro.ImageOriginal,50,50) %>" style="height:30px;padding:3px 0" />
                                <%=Shop.Bussiness.Language.Content(pro.Product_Name,CurrentLanguage) %>&nbsp;<a target="_blank" href="<%=Shop.Bussiness.ThemeUrl.GetURL("P_Product",pro.Product_id.ToString(),"",CurrentLanguage)%>"><img src="<%=PageImage("icon/newWindow.png")%>" /></a>
                            </td>
                            <td>
                                <%=Shop.Bussiness.EX_Product.ProPertyNameStr(Shop.Bussiness.EX_Product.GetProduct(pro.Product_id).ProPerty131, CurrentLanguage)%>
                            </td>
                            <td><%=Lang(Shop.Bussiness.EX_Product.ProductUnit(pro.Units_id))%></td>
                            <td>
                                <%if (model.IsVerified==1)
                                  { %>
                                <%=str + pro.Count%>
                                <%}
                                  else
                                  { %>
                                <input type="text" class="input" pro="true" name="Count<%=pro.id %>"  id="Count<%=pro.id %>" value="<%=pro.Count %>" onkeyup="value=value.replace(/[^\d]/g,'')" style="width: 70px;" />
                                <%} %>
                            </td>
                            <td>
                                <%=pro.Count_Shipped %>
                            </td>
                            <td>
                                <%=pro.Count_Received %>
                            </td>
                            <td>
                                <%if (model.IsVerified==1)
                                  { %>
                                <%=pro.Price %>
                                <%}
                                  else
                                  { %>
                                <input type="text" class="input" pro="true" name="Price<%=pro.id %>" id="Price<%=pro.id %>" value="<%=FormatMoney(pro.Price,"Number") %>" onkeyup="value=value.replace(/[^\d\.]/g,'')" style="width: 70px;" />
                                <%} %>
                            </td>
                            <td>
                                <%=str + FormatMoney(pro.Money)%>
                            </td>
                        </tr>

                    <%} %>
                    </table>
                </div>
                <%if (model.IsVerified == 0)
                  { %>
                <div style="text-align: left; margin-top: 10px;">
                    <div class="tools tools-m clear" style="margin-bottom:8px;">
                        <ul>
                            <li class="text"><input name="pnumber" id="pnumber" class="input" value="<%=Tag("商品编号")%>" onfocus="if (this.value == '<%=Tag("商品编号")%>') this.value = '';" onblur="if (this.value == '') this.value = '<%=Tag("商品编号")%>';"/></li>
                            <li class="add"><a href="javascript:void(0);" onclick="selectproduct(0);"><b></b><span><%=Tag("添加")%></span></a></li>
                        </ul>
                    </div>
                    <div class="tools tools-m clear">
                        <ul>
                            <li class="submit"><a href="javascript:void(0);" onclick="Pro_Save(<%=model.id %>);"><b></b><span><%=Tag("保存")%></span></a></li>
                            <li class="del"><a href="javascript:void(0);" onclick="Pro_Del(<%=model.id %>);"><b></b><span><%=Tag("删除")%></span></a></li>
                        </ul>
                    </div>
                </div>
                <%} %>
            </div>
        </div>
        <!--商品 end-->
        <!--收退款记录 start-->
        <div style="display: none" class="cont">
            <!--发货单据列表 start-->
            <div class="mod-title">
                <div><%=Tag("配送记录")%></div>
            </div>
            <div class="mod-table-main">
                <div class="con style05">
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <th style="width: 150px;">
                                <%=Tag("时间")%>
                            </th>
                            <th style="width: 100px;">
                                <%=Tag("类型")%>
                            </th>
                            <th style="width: 150px;">
                                <%=Tag("配送方式")%>
                            </th>
                            <th style="width: 150px;">
                                <%=Tag("发货单号")%>
                            </th>
                            <th style="width: 100px;">
                                <%=Tag("实际运费")%>
                            </th>
                            <th style="width: 150px;">
                                <%=Tag("状态")%>
                            </th>
                            <th style="width: 150px;">
                                <%=Tag("收/发件人")%>
                            </th>
                            <th>
                                <%=Tag("操作")%>
                            </th>
                            
                        </tr>
                        <%foreach (Shop.Model.Lebi_Transport_Order torder in torders)
                          { %>
                        <tr>
                            <td>
                                <%=FormatTime(torder.Time_Add) %>
                            </td>
                            <td>
                                <%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_OrderType) %>
                            </td>
                            <td>
                                <%=torder.Transport_Name %>
                            </td>
                            <td>
                                <%=torder.Code %>
                            </td>
                            <td>
                                <%=FormatMoney(torder.Money) %>
                            </td>
                            
                            <td>
                                <%=Shop.Bussiness.EX_Type.TypeName(torder.Type_id_TransportOrderStatus) %>
                            </td>
                            
                            <td>
                                <%=torder.T_Name %>
                            </td>
                            <td>
                                <a href="javascript:Order_shipping_view(<%=torder.id %>);"><%=Tag("查看")%></a> 
                                | <a href="javascript:Order_shipping_log(<%=torder.id %>);"><%=Tag("跟踪")%></a> 
                                | <a href="Express_Print.aspx?Tid=<%=torder.Transport_id %>&id=<%=model.id %>" target="_blank"><%=Tag("打印快递单")%><%if (model.IsPrintExpress == 1){ %>(<font class=red><%=Tag("已打印")%></font>)<%} %></a>
                            </td>
                        </tr>
                        <%} %>
                    </table>
                </div>
            </div>
            <!--发货单据列表 end-->
            <div class="hr40">
            </div>

        </div>
        <!--收退款记录 end-->
        <!--订单备注 start-->
        <div class="cont">
            <div class="mod-title">
                <div><%=Tag("订单备注")%></div>
            </div>
            <div class="mod-table-main">
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                <tr>
                <th height="30">
                <label><input type="radio" name="mark" shop="true" value="0" <%if (model.Mark == 0){Response.Write("checked");} %> /> <img src="<%=PageImage("mark/0.png")%>" height="12" /></label>&nbsp;
                <label><input type="radio" name="mark" shop="true" value="1" <%if (model.Mark == 1){Response.Write("checked");} %> /> <img src="<%=PageImage("mark/1.png")%>" height="12" /></label>&nbsp;
	            <label><input type="radio" name="mark" shop="true" value="2" <%if (model.Mark == 2){Response.Write("checked");} %> /> <img src="<%=PageImage("mark/2.png")%>" height="12" /></label>&nbsp;
	            <label><input type="radio" name="mark" shop="true" value="3" <%if (model.Mark == 3){Response.Write("checked");} %> /> <img src="<%=PageImage("mark/3.png")%>" height="12" /></label>&nbsp;
	            <label><input type="radio" name="mark" shop="true" value="4" <%if (model.Mark == 4){Response.Write("checked");} %> /> <img src="<%=PageImage("mark/4.png")%>" height="12" /></label>&nbsp;
	            <label><input type="radio" name="mark" shop="true" value="5" <%if (model.Mark == 5){Response.Write("checked");} %> /> <img src="<%=PageImage("mark/5.png")%>" height="12" /></label>
                </th>
                </tr>
                <tr>
                <th colspan="2">
               <textarea name="Remark_Admin" id="Remark_Admin" shop="true" class="textarea" style="width:600px;height:60px"><%=model.Remark_Admin %></textarea>
                <div class="tools clear">
                    <ul>
                        <li class="plus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Remark_Admin',100);"><b></b><span><%=Tag("展开")%></span></a></li>
                        <li class="minus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Remark_Admin',-100)"><b></b><span><%=Tag("收缩")%></span></a></li>
                    </ul>
                </div>
                </th>
                </tr>
                </table>
            </div>
            <%if (DeliveryCount > 0){ %>
            <div class="mod-title">
                <div><%=Tag("配送点")%></div>
            </div>
            <div class="mod-table-main">
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                <tr>
                <th height="30">
                <select name="Supplier_Delivery_id" shop="true">
                <option value="0"><%=Tag("请选择")%></option>
                <%foreach (Shop.Model.Lebi_Supplier_Delivery delivery in deliveries){ %>
                <option value="<%=delivery.id %>" <%=delivery.id == model.Supplier_Delivery_id?"selected":"" %>><%=delivery.Name %></option>
                <%} %>
                </select>
                </th>
                </tr>
                </table>
            </div>
            <%} %>
            <div style="text-align:left;margin-top:10px;">
                <div class="tools tools-m">
                    <ul>
                        <li class="submit"><a href="javascript:void(0);" onclick="SaveOrder(<%=model.id %>);"><b></b><span><%=Tag("保存")%></span></a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div style="display: none" class="cont">
            <div class="mod-title">
                <div><%=Tag("订单留言")%></div>
            </div>
            <div style="text-align:left;margin-top:10px;">
               <textarea name="Comment" id="Comment" Comment="true" class="textarea" style="width:600px;height:60px"></textarea>
                <div class="tools clear">
                    <ul>
                        <li class="plus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Comment',100);"><b></b><span><%=Tag("展开")%></span></a></li>
                        <li class="minus"><a href="javascript:void(0);" onclick="javascript:resizeEditor('Comment',-100)"><b></b><span><%=Tag("收缩")%></span></a></li>
                    </ul>
                </div>
            </div>
            <div style="text-align:left;margin-top:10px;">
                <div class="tools tools-m clear">
                    <ul>
                        <li class="submit"><a href="javascript:void(0);" onclick="SaveComment(<%=model.id %>);"><b></b><span><%=Tag("保存")%></span></a></li>
                    </ul>
                </div>
            </div>
            <div class="mod-table-main">
                <div class="con style05">
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        
                        <tr>
                            <th style="width:30px;" class="selectAll">
                <a href="javascript:void(0);" onclick="$('input[name=\'commid\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));"><%=Tag("全选")%></a></th>
                            <th style="width:150px;">
                                <%=Tag("时间")%>
                            </th>
                            <th>
                                <%=Tag("内容")%>
                            </th>
                        </tr>
                      <%foreach (Shop.Model.Lebi_Comment comm in comms)
                        { %>
                        <tr>
                            <td style="text-align:center">
                                <input type="checkbox" name="commid" value="<%=comm.id %>" del="true" />
                            </td>
                            <td>
                                <%=FormatTime(comm.Time_Add) %>
                            </td>
                            
                            <td>
                                <%
                                    if (comm.Admin_id > 0)
                                        Response.Write("[" + Tag("管理员") + "]" + comm.Admin_UserName);
                                    if (comm.User_id > 0)
                                        Response.Write("[" + Tag("会员") + "]" + comm.User_UserName);
                                    if (comm.Supplier_id > 0)
                                        Response.Write("[" + Tag("供应商") + "]" + comm.Supplier_SubName);
                                %> ：
                                <%=comm.Content%>
                            </td>
                        </tr>

                    <%} %>
                    </table>
                </div>
                <div style="text-align:left;margin-top:10px;">
                    <div class="tools tools-m clear">
                        <ul>
                            <li class="del"><a href="javascript:void(0);" onclick="Comment_Del(<%=model.id %>);"><b></b><span><%=Tag("删除")%></span></a></li>
                        </ul>
                    </div>
                </div>
                
            </div>
        </div>
        <!--订单备注 end-->
        <!--订单日志 start-->
        <div style="display: none" class="cont">
            <div class="mod-title">
                <div><%=Tag("订单日志")%></div>
            </div>
            <div class="mod-table-main">
                <div class="con style05">
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <th width="150px;">
                                <%=Tag("时间")%>
                            </th>
                            <th width="180px;">
                                <%=Tag("操作人")%>
                            </th>
                            <th >
                                <%=Tag("行为")%>
                            </th>
                        </tr>
                        <% 
                            foreach (Shop.Model.Lebi_Log log in Logs)
                            {    
                            
                        %>
                        <tr>
                            <td><%=FormatTime(log.Time_Add) %></td>
                            <td><%
                                if(log.Admin_id>0)
                                    Response.Write("["+Tag("管理员")+"]"+log.AdminName);
                                if(log.User_id>0)
                                    Response.Write("["+Tag("会员")+"]"+log.UserName);
                                if (log.Supplier_id > 0)
                                    Response.Write("["+Tag("供应商")+"]"+log.Supplier_SubName);
                                %></td>
                            <td><%=log.Content +" "+ log.Description%></td>
                        </tr>
                        <% } %>
                    </table>
                </div>
            </div>
        </div>
        <!--订单日志 end-->
    </div>
</lbbody>